//  [10/18/2013 OMEGA] created

#ifndef _DUELECSELECTIONMASK_H_
#define _DUELECSELECTIONMASK_H_

#include <QMap>
#include "DuelECCommon.h"

namespace DuelEC
{

	// selection mask worked on selectable's typeId.
	// if not specified explicitly disabled, every type is enabled.
	class DUELEC_API DECSelectionMask
	{
	public:
		DECSelectionMask();
		DECSelectionMask( const DECSelectionMask& in );

		virtual ~DECSelectionMask();

		void		enableSelectable(DECObjectTypeID id);
		void		disableSelectable(DECObjectTypeID id);
		void		setSelectable(DECObjectTypeID id, bool flag);
		// query whether specified object is enabled.
		bool		queryEnabled(DECObjectTypeID id);

		DECSelectionMask	operator| ( DECObjectTypeID selType );
		DECSelectionMask	operator| ( DECSelectionMask& mask );
		DECSelectionMask&	operator =( const DECSelectionMask& other );

		typedef QMap<DECObjectTypeID, bool>		MaskMap;
		MaskMap*	getMaskMap() { return &mMaskMap; }

	protected:
		MaskMap		mMaskMap;
	};

}
#endif